
/**
 * HXS - Haxe Signals Library
 * @author Tony Polinelli
 */

 
package ;

import hxs.Signal;
import hxsTest.General;
import flash.display.Sprite;
import flash.events.MouseEvent;

#if (flash || cpp)
import hxsTest.Flash;
#end

using hxs.Shortcuts;

class Main extends Sprite
{
	/*
	
	Comment / uncomment to switch test file. Uncomment specific tests in that file later.
	
	*/
	public static function main() 
	{	
		//new General();
		#if (flash || cpp)
		//new Flash();
		#end
		
		flash.Lib.current.addChild(new Main());
	}
	
	public function new()
	{
		super();
		
		graphics.beginFill(0xff0000, 1);
		graphics.drawCircle(0, 0, 100);
	
		this.addEventListener(flash.events.MouseEvent.CLICK, call1);
	}	
	
	function call1(e)
	{
		trace("call 1");
		this.addEventListener(flash.events.MouseEvent.CLICK, call2);
	}
	function call2(e)
	{
		trace("call 2");
	}
}